A charged particle beam device such as a scanning electron microscope is a device appropriate for measuring or observing a pattern which is formed on a semiconductor wafer while in the process of increased fineness. In the related art, as a method of obtaining three-dimensional information of a sample in a charged particle beam device, particularly, obtaining unevenness information of the sample, in PTL 1, areas of portions at which a profile is lower than a predetermined height in an area formed by the profile and the predetermined height are calculated. When the calculated areas are classified into two groups of a group of large areas and a group of small areas, if there is a sufficiently meaningful difference between the two groups, portions corresponding to the group of large areas are judged as a concave portion, and the other portions are judged as a convex portion. If the difference between the two groups is not sufficiently meaningful, portions corresponding to the two groups are judged as concave portion, and the other portions are judged as a convex portion. Thus, the unevenness information is obtained.
Regarding lines generated in double patterning, in PTL 2, a luminance difference between two peaks of the right and left lines which are adjacent to a space set as a target, a distance from a point of the center portion of the line, which has the minimum luminance value, to a point of the line close to the space, which has a peak, average luminance, and the like are set as a feature quantity, and thus it is distinguished which space is a core space or a gap space.